@extends("home.layouts")

@section("content")
	<div class="container">
    <ul class="breadcrumb">
        <li><a href="http://shop14.jccms.cn/index.php?route=common/home"><i class="fa fa-home"></i></a></li>
        <li><a href="http://shop14.jccms.cn/index.php?route=account/account">賬戶1</a></li>
    </ul>
    <div class="row"> 
      <div id="content" class="col-sm-9">       <h2>編輯地址2</h2>
        <form @if(isset($data)) action="{{ route('address.update', $data) }}" @else action="{{ route('address.store') }} @endif" method="post">

          <fieldset>
            @text(['name' => 'full_name', 'label' => '收件人', 'default' => $data->full_name??''])@endtext
            @text(['name' => 'phone', 'label' => '联系电话', 'default' => $data->phone??''])@endtext

            @component('home.components.area-select', ['default' => $data??'']) @endcomponent

            @text(['name' => 'street', 'label' => '街道门牌号', 'default' => $data->street??'']) @endtext
            @text(['name' => 'post_code', 'label' => '邮编', 'default' => $data->post_code??'']) @endtext
            @component('home.components.radio', ['label' => '是否默认', 'name' => 'is_default', 'options' => [0 => '否', 1 => '是' ], 'checked' => $data->is_default ?? '0']) @endcomponent
          </fieldset>

          @csrf

          @if(isset($data)) @method('PUT') @endif
          <div class="buttons clearfix">
          	@component('home.components.error') @endcomponent
            <div class="pull-left"><a href="http://shop14.jccms.cn/index.php?route=account/address" class="btn btn-default">返回</a></div>
            <div class="pull-right">
              <input type="submit" value="繼續" class="btn btn-primary">
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
@endsection